define(function(require,exports,module){
   var 
    Vue=require('Vue'),
    vm;
	function initHeader(){
		if(!vm)vm=new Vue({
	    	el:'#topbar',
	     	data:{
	     		show:true,
	     		leftLink:'javascript:history.go(-1)',
	     		rightLink:"#/",
	     		title:'',
	     		rightTitle:''
	     	},
	     	template:$('#topbarTpl').html()
	   	});
	}
	exports.init=initHeader;
	exports.setShow=function(i){
		vm.show=i;
	}
	exports.setTitle=function(i){
		vm.title=i;
	}
	exports.setRightTitle=function(i){
		vm.rightTitle=i;
	}
	exports.setLeftLink=function(i){
		vm.leftLink=i;
	}
	exports.setRightLink=function(i){
		vm.rightLink=i;
	}
});